home *** CD-ROM | disk | FTP | other *** search
/ .net 2002 March / DotNetMagazine-Issue107-Coverdisc-NET107-02-03-PCMac.bin / pc / PC Software / Coldfusion / coldfusion-60-win-en.exe / additem.cfm < prev    next >
Encoding:
Text File  |  2002-01-15  |  1.7 KB  |  47 lines

  1. Event(load){
  2.     //***************************************************************************
  3.     //amount of frames each headline will remain on the screen
  4.     //the larger the value, the longer each story will remain before fading out
  5.     swapDelay = _root.ScrollRate;
  6.  
  7.     //***************************************************************************
  8.  
  9.     //set the values of these 2 text fields to empty strings...for now.
  10.     headline.text = "";
  11.     story.text = "";
  12.  
  13.     //specify that no headline has been displayed yet
  14.     currentHeadline = 0;
  15.     //set the inital alpha transparency to zero
  16.     _alpha = 0;
  17.     //specifiy that that clickable button is not rolled over on load
  18.     over = 0;
  19.     //initialize the "timer"
  20.     count = 0;
  21. }
  22. onClipEvent(enterFrame){
  23.     //if the user is currently rolled over the hit area
  24.     if(over == 0){
  25.         //if the headline is currently invisible...
  26.         if(_alpha == 0){
  27.             //set the new alpha value to 100 (full opacity)
  28.             newAlpha = 100;
  29.             //if the current headline being displayed is the last one in the cycle...
  30.             if(currentHeadline == _root.totalHeadlines){
  31.                 //check with Server to see if there are any new news items to be displayed
  32.                 _root.totalHeadlines = 0;
  33.                 //go back to frame 2 of the movie where it calls to check to see if there are
  34.                 //any new news item to be displayed since last checked
  35.                 _root.gotoAndStop(2);
  36.             }else{
  37.                 //otherwise...move to the next headline in the sequence
  38.                 currentHeadline++;
  39.             }
  40.  
  41.             //specify the current headline text, story text, and URL values
  42.             headline.text = "'" + _root["newsHeadline" + currentHeadline] + "'";
  43.             story.text = _root["newsStory" + currentHeadline];
  44.             fullArticleURL = _root["newsfullStoryURL" + currentHeadline];
  45.         }
  46.         
  47.         //if the current alpha value is not within